package com.sheng.project.controller;

import com.sheng.project.service.WeChatService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 微信 jsapi
 *
 * @author by ls
 * @date 2023/8/11
 */
@RestController
@RequestMapping("/wx")
@AllArgsConstructor
public class WeChatController {

    @Resource
    private WeChatService weChatService;

    @GetMapping("/jsapi")
    public Map<String, String> jsapi(@RequestParam String url) {
        return weChatService.jsapi(url);
    }
}
